/**
  * This is a table renderer for scientific notation.
  * @author Aaron A. Lovato
  */
package gui;

import java.text.DecimalFormat;
import javax.swing.table.DefaultTableCellRenderer;

public class ScientificRenderer extends DefaultTableCellRenderer
{
    private DecimalFormat formatter;
    
    public ScientificRenderer()
    {
        super();
        formatter = new DecimalFormat("0.0###E0");
    }
    public void setValue(Object value) 
    {
        setText((value == null) ? "" : formatter.format(value));
    }

}